﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using System.Drawing;


namespace HA.Data.DisplayOptions2
{

    
    [Serializable ]
    public class ContourLinesConfigure : DataChangeProperty, IObjectDataHelper
    {

       //注意 ：修改字段后 需要修改运算符重载


        public ContourLinesConfigure()
        { 
        
        

        
        
        }


        double _lineWidth = 2.0;
        /// <summary>
        /// 等值线线条宽度
        /// </summary>
        public double LineWidth
        {
            get { return _lineWidth; }
            set { _lineWidth = value; }
        }


        Color _lineColor = Color.Black;
        /// <summary>
        /// 等值线线条颜色
        /// </summary>
        public Color LineColor
        {
            get { return _lineColor; }
            set { _lineColor = value; }
        }






        #region 运算符重载


        public static bool operator ==(ContourLinesConfigure sp1, ContourLinesConfigure sp2)
        {

            if ((object)sp1 == null && (object)sp2 == null)
            {
                return true;
            }

            if (((object)sp1 == null && (object)sp2 != null) || ((object)sp1 != null && (object)sp2 == null))
            {
                return false;
            }


            if (sp1 != null && sp2 != null)
            {


                if (sp1._lineColor != sp2._lineColor)
                {
                    return false;
                }


                if (sp2._lineWidth != sp1._lineWidth)
                {
                    return false;
                }



            }


            return true;
        }

        public static bool operator !=(ContourLinesConfigure sp1, ContourLinesConfigure sp2)
        {
            return (!(sp1 == sp2));

        }


        #endregion







        #region IObjectDataHelper 成员

        public void ResetDataAndTriggerEvent(object obj)
        {



            //throw new NotImplementedException();
        }

        public bool IsDataChanged()
        {
            if (this == null)
            {
                return false;
            }
            if (this.IsNeedUpdateData == true)
            {
                return true;
            }
            else
            {

                return false;
            }


            //throw new NotImplementedException();
        }

        #endregion
    }


}
